Skip to content

Include what the wasm runtime uses, so it builds with Emscripten 7 - #2633

Merged
bfiete merged 1 commit into
beefytech:masterfrom
robknopf:pr/wasm-rt-includes
Dec 1, 2026
Merged

bfiete merged 1 commit into
beefytech:masterfrom
robknopf:pr/wasm-rt-includes

Conversation

@robknopf

@robknopf robknopf commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Array.h uses std::is_pod and PosixCommon.cpp uses errno, but neither includes the header that declares it; both arrived through other headers. The libc++ in Emscripten 7 no longer pulls them in that way, so wasm/build_wasm.sh fails in 9 of its 14 sources:

error: no template named 'is_pod' in namespace 'std'
error: use of undeclared identifier 'errno'

Array.h now includes <type_traits> and PosixCommon.cpp includes <errno.h>.

Checked on Linux:

  • Every runtime source compiles with Emscripten 7.0.1 and 5.0.7, with and without -pthread.
  • build_wasm.sh builds all four runtime archives with 7.0.1.
  • A Release wasm32 program links and runs against them.

The bundled emsdk from fetch_wasm.bat was not tested, but the change can't affect it: it only adds includes.

Array.h uses std::is_pod and PosixCommon.cpp uses errno, but neither
included the header that declares it; both came in through other headers.
The libc++ in Emscripten 7 no longer pulls them in that way, so
wasm/build_wasm.sh failed with "no template named 'is_pod'" and "use of
undeclared identifier 'errno'" in 9 of its 14 sources.

Array.h now includes <type_traits> and PosixCommon.cpp includes <errno.h>.
Every runtime source compiles with Emscripten 7.0.1 and 5.0.7, with and
without -pthread.
@bfiete
bfiete merged commit 71ee5e7 into beefytech:master Dec 1, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants